<?
if(isset($_POST['save'])){
	//Checks op doen oftewel via javascript
	$name = trim(strip_tags($_POST['profile_name']));
	$fname = trim(strip_tags($_POST['profile_fname']));
	$email = trim(strip_tags($_POST['profile_email']));
	$phone = trim(strip_tags($_POST['profile_phone']));
	$flag1 = $_POST['profile_flag01'];
	$flag2 = $_POST['profile_flag02'];
	$flag3 = $_POST['profile_flag03'];
	$flag4 = $_POST['profile_flag04'];
	$sql = "UPDATE SET ".$pre."_users VALUES(null,'$name','$fname',null,null,'$email','$phone,'$flag1','$flag2','$flag3','$flag4')";
	$res = mysql_query($sql);
	if($res)echo 'Profile updated';else 'Failed to update profile';
}
?>